package com.ss.android.wenda.answer.list;

import android.graphics.drawable.Drawable;

import com.bytedance.retrofit2.Callback;
import com.bytedance.retrofit2.ResponseWrapper;
import com.ss.android.article.common.model.ActionResponse;

final class i implements Callback {
    private final AnswerListFragment a;

    i(AnswerListFragment arg1) {
        this.a = arg1;

    }

    public final void onCacheResponse(ResponseWrapper response) {
        Drawable v3 = null;
        if(response != null) {
            Object v0 = response.body;
            if(this.a.isViewValid()) {
                if(((ActionResponse)v0).mErrorCode != 0) {
                    android.support.design.a.a(AnswerListFragment.k(this.a), ((ActionResponse)v0).mErrorTips, v3, 0);
                }
                else {
                    AnswerListFragment.l(this.a).setFollowQuestionBtnSeleted(false);
                    android.support.design.a.a(AnswerListFragment.k(this.a), "取消关注", v3, 0);
                }
            }
        }
    }

    public final void onErrorResponse(Throwable throwable) {
        android.support.design.a.a(AnswerListFragment.k(this.a), "操作失败", null, 0);
    }
}

